/**
 *   FUSE-J: Java bindings for FUSE (Filesystem in Userspace by Miklos Szeredi (mszeredi@inf.bme.hu))
 *
 *   Copyright (C) 2003 Peter Levart (peter@select-tech.si)
 *
 *   This program can be distributed under the terms of the GNU LGPL.
 *   See the file COPYING.LIB
 */

package fuse;

import fuse.util.Struct;


public class FuseFtype extends Struct
{
   // file type 'mode' bits

   public static final int TYPE_MASK     = 0170000;   // bitmask for the file type bitfields
   public static final int TYPE_SOCKET   = 0140000;   // socket
   public static final int TYPE_SYMLINK  = 0120000;   // symbolic link
   public static final int TYPE_FILE     = 0100000;   // regular file
   public static final int TYPE_BLOCKDEV = 0060000;   // block device
   public static final int TYPE_DIR      = 0040000;   // directory
   public static final int TYPE_CHARDEV  = 0020000;   // character device
   public static final int TYPE_FIFO     = 0010000;   // fifo


   public int mode;


   protected boolean appendAttributes(StringBuffer buff, boolean isPrefixed)
   {
      buff.append(super.appendAttributes(buff, isPrefixed)? ", " : " ").append("mode=").append(mode);

      return true;
   }
}
